The present disclosure is directed to video coding and decoding techniques and, in particular, to application of sample adaptive offset filters.
A sample adaptive offset (SAO) filter is a non-linear image data filter designed to improve reconstruction of original image samples, for example by reducing visual banding and ringing artifacts, and by reducing visual artifacts at edges. An SAO filter, such as is defined in the H.265 (also known as “HEVC”) coding protocol, is applied within the prediction loop of a video encoder or decoder. The HEVC SAO filter includes classification of pixels and application to reconstructed image data of pixel value offsets from a lookup table. HEVC coding tree blocks (CTBs) may individually disable the SAO filter, or may enable the SAO filter in one of two modes: a band offset (BO) mode, or an edge offset (EO) mode. The SAO filter's lookup table is encoded into the compressed bitstream, and may be determined by an encoder, for example, based on a histogram or other statistical analysis of image data.
The HEVC BO mode applies an offset from the lookup table based on the amplitude (or value) of a single pixel sample. A pixel is categorized by its amplitude into one of 32 bands (histogram bins). Offsets are specified for only four consecutive of the 32 bands, because in flat areas which are prone to banding artifacts, sample amplitudes tend to be clustered in a small range.
The HEVC EO mode operates by comparing a pixel's value to two of its eight neighboring pixels using one of four directional gradient patterns. Based on a comparison with these two neighbors, the sample is classified into one of five categories: minimum, maximum, an edge with the sample having the lower value, an edge with the sample having the higher value, or monotonic. Then, for each of the first four categories, an offset from the lookup table is applied.
High dynamic range (HDR) digital image data has become common and may differ in various aspects from standard dynamic range (SDR) representations of video data. For example, HDR may allow for representations of a wider dynamic range of luminosity, may be a higher precision representation, and may use different electro-optical transfer function (EOTF). Compared to SDR processing, HDR processing uses a different EOTF and has a greater dynamic range of luminosity to reproduce the real world. An EOTF can define how to convert digital code words to linear luminance. An example of SDR EOTF is a Gamma EOTF, for example as defined in ITU-R BT.1886, while an example HDR EOTF is the perceptual quantizer (PQ) transfer function defined in SMPTE standard ST 2084.
With an HDR EOTF, coding distortion and activity measurements are related to the brightness of pixels.
The inventors have determined that presently-available SAO filtering techniques, such as the SAO filter in HEVC, do not provide optimal performance when applied to HDR image data. Accordingly, they have identified a need for improved SAO filtering techniques to improve the quality of HDR image data recovered by video decoders.